<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminRolesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_role_relations', function (Blueprint $table) {
            $table->increments('id');
           $table->integer('user_id',false,true)->default(0)->comment('管理员id');
            $table->integer('role_id',false,true)->default(0)->comment('角色id');
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `admin_role_relations` comment '管理员角色关联表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_role_relations');
    }
}
